import React, {createContext, useContext} from 'react'

const globalContext = createContext()
export const {Provider,Consumer} = globalContext

//自定义hooks函数，首字母小写且必须是以use开头
export const useAppContext = ()=>useContext(globalContext)
//当使用到globalContext时可以暴露(可选,尽量采用以上暴露方式)
export default globalContext